//
//  AppDelegate.m
//  sentorise
//
//  Created by admin on 2025/8/21.
//

#import "AppDelegate.h"
#import "HomeViewController.h"

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    
    self.window = [[UIWindow alloc] init];
    self.window.frame = [UIScreen mainScreen].bounds;
    
    HomeViewController *homeVC = [[HomeViewController alloc] initWithNibName:@"HomeViewController" bundle:nil];
    UINavigationController *nv = [[UINavigationController alloc] initWithRootViewController:homeVC];
    self.window.rootViewController = nv;
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeLng) name:@"ChangedLanguageNotification" object:nil];
    
    [self.window makeKeyAndVisible];
    
    return YES;
}

- (void)changeLng {
    HomeViewController *homeVC = [[HomeViewController alloc] initWithNibName:@"HomeViewController" bundle:nil];
    UINavigationController *nv = [[UINavigationController alloc] initWithRootViewController:homeVC];
    self.window.rootViewController = nv;
}


@end
